<!DOCTYPE html>
{% load static %}
{% load i18n %}

<html lang="zh-hans">
<head>
    <title>{% trans '本地登录' %}</title>
    <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <link rel="stylesheet" type="text/css" href="{% static 'bootstrap-4.5.0/css/bootstrap.min.css' %}">
</head>
<body>
<div class="container-fluid">
    <div class="d-flex align-items-center justify-content-center" style="height: 80vh;">
        <div class="card border-0 shadow-sm" style="min-width: 400px">
            <div class="bg-light p-2">
                <span class="">{% trans '登录 智能运维AIOps' %}</span>
            </div>
            <div class="card-body">
                {% if form.errors %}
                    <div class="text-danger">{{ form.non_field_errors }}</div>
                {% endif %}
                <form method="post" action="{% url 'users:local_login' %}" id="login-form">
                    {% csrf_token %}
                    <div class="input-group form-group">
                        <div class="input-group-prepend">
                            <label class="input-group-text" id="id_username" style="min-width: 80px">{% trans '用户名' %}:</label>
                        </div>
                        <input type="text" name="username" class="form-control" required id="id_username" placeholder="username">
                    </div>
                    <div class="input-group form-group">
                        <div class="input-group-prepend">
                            <label class="input-group-text" for="id_password" style="min-width: 80px">{% trans '密码' %}:</label>
                        </div>
                        <input class="form-control" type="password" name="password" required id="id_password" placeholder="password">
                    </div>
                    <div >
                        <input type="hidden" name="next" value="{{ request.GET.next }}">
                        <input type="hidden" name="this_is_the_login_form" value="1"/>
                    </div>
                    <div class="form-group">
                        <input class="btn btn-primary" id="btn-submit" type="submit" value="{% trans '登录' %}">
{#                        <a class="btn text-warning" href="{% url 'users:forget' %}">忘记密码</a>#}
                        <a class="btn btn-outline-success float-right" onclick="alert('暂不允许个人注册，请联系管理员');return false;">注册</a>
                    </div>
                    <div class="border-top">
                        <a class="btn btn-sm p-2" href="{% url 'users:login' %}"><i class="fa fa-share"></i> <i class="fa fa-user"></i> {% trans '中国科技云通行证账号登录' %}</a>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="{% static 'fontawesome-free/js/all.min.js' %}"></script>
</body>
</html>

